Skip to main content

googleGetSignInServerAuthCode

Type

handler

Summary

Get an ID token that you can send to your server

Syntax

googleGetSignInServerAuthCode()

Description

Use the googleGetSignInServerAuthCode to obtain a one-time server authentication code to send to your web server which can be exchanged for an access token or refresh token. If no user is authenticated then a 'Not authenticated' error is thrown.

note

In order to obtain an authentication code for the authenticated user, the client id of the backend server must have been present in the "server-client-id" key of the options array passed to the googleSignIn handler. If it was not, then googleGetSignInAuthCode returns empty.

note

If the "require-offline-access" key was not present in the options array passed to the googleSignIn handler, then googleGetSignInServerAuthCode returns empty. Use googleGetSignInIdToken instead to configure online access.

Examples

put googleGetSignInServerAuthCode() into tAuthID

Value

NameTypeDescription

return

The googleGetSignInServerAuthCode handler returns a one-time server authentication code to send to your web server which can be exchanged for an access token or refresh token.

handler: googleSignIn, googleGetSignInIdToken

Compatibility and Support

OS

android